package run.siyuan.jdk.设计模式.工厂模式.工厂模式案例2;

/**
 * @className: NvWa
 * @Description: TODO 工厂模式-女娲测试
 * @author: siyuan
 * @date: 2022/3/11 6:07 PM
 */
public class NvWa {

    public static void main(String[] args) {
        Human blackHuman = HumanFactory.createHuman(BlackHuman.class);
        blackHuman.getColor();
        blackHuman.talk();

        Human whiteHuman = HumanFactory.createHuman(WhiteHuman.class);
        whiteHuman.getColor();
        whiteHuman.talk();

        Human yellowHuman = HumanFactory.createHuman(YellowHuman.class);
        yellowHuman.getColor();
        yellowHuman.talk();
    }

}
